    <link href="../resources/css.css" rel="stylesheet" type="text/css" />

        <script type="text/javascript" src="../resources/calendario/calendar.js"></script>
    <script type="text/javascript" src="../resources/calendario/calendar-setup.js"></script>
    <script type="text/javascript" src="../resources/calendario/calendar-es.js"></script>
    <style type="text/css"> @import url("../resources/calendario/calendar-system.css"); </style>

    <link rel="stylesheet" href="../resources/style.css" />
<script type="text/javascript" src="../resources/javascript/tinybox.js"></script>

<link rel="stylesheet" type="text/css"
	href="../resources/css/extremecomponents.css">
<script type="text/javascript"
	src="../resources/javascript/extremecomponents.js"></script>
	
	<script type="text/javascript"
	src="../resources/javascript/jquery.js"></script>
	
<script src="../resources/javascript/jquery.js" type="text/javascript"></script>
<script src="../resources/javascript/jquery.validate.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="../resources/cmxform.css" />
<style type="text/css">
#commentForm { width: 500px; }
#commentForm label { width: 250px; }
#commentForm label.error, #commentForm input.submit { margin-left: 253px; }
</style>


<script type="text/javascript">
function showEditBtn(){
	$(".btnEditar").hide("fast");
	$(".btnAgregar").hide("slow");
	$(".btnEditar").show("slow");
	
}

function hiddenEditBtn(){
	$(".btnEditar").hide("fast");
	$(".btnAgregar").show("slow");								
}

function edit(formulario,accion){				
	var nav= $.browser;
	if(nav.msie){
		
		var form =  document.getElementById(formulario);
		form.action=accion;
		form.submit();
	}
	else{
		
		var form = document.forms[formulario];
		form.action = accion;
		form.submit;	
	}
																	
}


function convertDate(stringdate) 
{ 
    // Internet Explorer does not like dashes in dates when converting,  
    // so lets use a regular expression to get the year, month, and day  
    var DateRegex = /([^-]*)-([^-]*)-([^-]*)/; 
    var DateRegexResult = stringdate.match(DateRegex); 
    var DateResult; 
    var StringDateResult = ""; 
 
    // try creating a new date in a format that both Firefox and Internet Explorer understand 
    try 
    { 
        DateResult = new Date(DateRegexResult[2]+"/"+DateRegexResult[3]+"/"+DateRegexResult[1]); 
    }  
    // if there is an error, catch it and try to set the date result using a simple conversion 
    catch(err)  
    {  
        DateResult = new Date(stringdate);  
    } 
 
    // format the date properly for viewing 
    StringDateResult = (DateResult.getMonth()+1)+"/"+(DateResult.getDate()+1)+"/"+(DateResult.getFullYear()); 
 
    return StringDateResult; 
} 

function soloNumeros(evt){
	
	//asignamos el valor de la tecla a keynum
	if(window.event){// IE
	keynum = evt.keyCode;
	}else{
	keynum = evt.which;
	}
	//comprobamos si se encuentra en el rango
	if(keynum>47 && keynum<58){
	return true;
	}else{
	return false;
	}
	}
	
function soloMoneda(event) { 
		if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) { 
			event.preventDefault(); 
			}
		}


function MoneyFormat(amount) { 
	var val = parseFloat(amount); 
	if (isNaN(val)) { return "0.00"; } 
	if (val <= 0) { return "0.00"; } 
	val += ""; 
	// Next two lines remove anything beyond 2 decimal places 
	if (val.indexOf('.') == -1) { return val+".00"; } 
	else { val = val.substring(0,val.indexOf('.')+3); } 
	val = (val == Math.floor(val)) ? val + '.00' : ((val*10 == 
	Math.floor(val*10)) ? val + '0' : val); 
	return val; 
	} 
</script>
